<template>
	<view style="position: fixed;width: 100%;height: 100%;background: #fff;z-index: 100;text-align: center;">
		<image src="/static/img/loginlog.png" style="width: 110px;height: 110px;margin: auto;margin-top: 40%;display: block;" mode="" :animation="animation"></image>
		<text style="position: absolute;bottom: 50px;display: block;text-align: center;width: 100%;font-size: 22px;font-weight: bold;color: rgb(24,146,235);">概率社区</text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				animation:{},
				Time:{},
				type:false,
				r:0
			}
		},
		methods: {
			ami(){
				var t = 1500,_this = this,s = .7;
				this.r = this.r + 180;
				if(!_this.type){
					s = 1.5;
				}
				var animations = uni.createAnimation({
					duration: t,
				    timingFunction: 'linear',
				});
				// animations.scale(s).rotate(this.r).step();
				animations.rotate(this.r).step();
				this.animation = animations.export();
			}
		},
		onShow() {
			var _this = this;
			_this.ami();
			this.Time = setInterval(function(){
				_this.type = !_this.type;
				_this.ami();
			},1600);
			setTimeout(function(){
				uni.switchTab({
					url:"/pages/index/index"
				})
			},4000)
		},
		onHide() {
			clearInterval(this.Time);
			this.type = false;
			this.r = 0;
		}
	}
</script>

<style>

</style>
